package com.yxw.bamboo.core;

import com.yxw.bamboo.core.database.sql.HostStatus;

public class NetworkContext {
    public NetworkContext(){

    }
    private String sqlType;

    public String getCodeType() {
        return codeType;
    }

    public void setCodeType(String codeType) {
        this.codeType = codeType;
    }

    public void setHostStatus(HostStatus hostStatus) {
        this.hostStatus = hostStatus;
    }

    private String codeType;

    public String getCommonType() {
        return commonType;
    }

    public void setCommonType(String commonType) {
        this.commonType = commonType;
    }

    private String commonType;
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public HostStatus getHostStatus() {
        return hostStatus;
    }

    private HostStatus hostStatus;

    public void setStart()
    {
        this.hostStatus=HostStatus.start;
    }

    public void setEnd()
    {
        this.hostStatus=HostStatus.end;
    }

    public void setError()
    {
        this.hostStatus=HostStatus.error;
    }
    public void setRestart()
    {
        this.hostStatus=HostStatus.restart;
    }
    private Integer id;
    private int localPort;
    private String remoteHostAddr;
    private int remoteHostPort;

    public String getLocalHostAddr() {
        return localHostAddr;
    }

    public void setLocalHostAddr(String localHostAddr) {
        this.localHostAddr = localHostAddr;
    }

    private String localHostAddr;

    public NetworkContext(String sqlType, int localPort, String remoteHostAddr, int remoteHostPort, Boolean ssl,Integer id,String codeType,String commonType) {
        this.sqlType = sqlType;
        this.localPort = localPort;
        this.remoteHostAddr = remoteHostAddr;
        this.remoteHostPort = remoteHostPort;
        this.codeType=codeType;
        this.ssl = ssl;
        this.id=id;
        this.commonType=commonType;
    }

    public String getSqlType() {
        return sqlType;
    }

    public void setSqlType(String sqlType) {
        this.sqlType = sqlType;
    }

    public int getLocalPort() {
        return localPort;
    }

    public void setLocalPort(int localPort) {
        this.localPort = localPort;
    }

    public String getRemoteHostAddr() {
        return remoteHostAddr;
    }

    public void setRemoteHostAddr(String remoteHostAddr) {
        this.remoteHostAddr = remoteHostAddr;
    }

    public int getRemoteHostPort() {
        return remoteHostPort;
    }

    public void setRemoteHostPort(int remoteHostPort) {
        this.remoteHostPort = remoteHostPort;
    }

    public Boolean getSsl() {
        return ssl;
    }

    public void setSsl(Boolean ssl) {
        this.ssl = ssl;
    }

    private Boolean ssl;

}
